<template>
  <div>
      
      <div class="box" @click="fun()">
          <h1 v-show="bool" >显示和隐藏</h1>
         <button v-show="bool">点盒子隐藏文字</button>
      </div>
    <div class="box1">
        <a :href="baidu">{{text}}</a>
    </div>
    
  </div>
</template>

<script>
export default {
   data(){
       return{
           bool:true,
        text:"点我去百度",
           baidu:"http://baidu.com"
       }
   },
   methods:{
       fun(){
           this.bool=false
       }
   }
}
</script>

<style scoped>
    .box{
        width: 25.25rem;
        height: 5.25rem;
        background-color: red;
    }
</style>